﻿using PrinterMonitorSvc.Common;
using PrinterMonitorSvc.Core.Attribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace PrinterMonitorSvc.Controller
{
    /// <summary>
    /// 打印机控制器
    /// </summary>
    [RequestMapping("printer")]
    public class PrinterController: ControllerBase
    {
        public PrinterController(HttpListenerRequest request, HttpListenerResponse response) : base(request, response)
        {
        }

        /// <summary>
        /// 获取所有打印机
        /// </summary>
        [GetMapping]
        public IEnumerable<string> GetAllPrinter()
        {
            return PrinterHelper.GetAllPrinters();
        }
    }
}
